home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
051-060
/
amok51
/
m2
/
defs
/
randomnumber.def
< prev
next >
Wrap
Text File
|
1993-11-04
|
603b
|
22 lines
DEFINITION MODULE RandomNumber; (* jr/2jul87 *)
(*$ LargeVars:=FALSE NameChk:=FALSE *)
PROCEDURE Random(): REAL;
(*
This function returns real pseudo-random numbers in the range [0,1).
It is guaranteed that the period of the sequence is greater than 2^23.
*)
PROCEDURE RND(n: LONGINT): LONGINT;
(*
This function returns integer pseudo-random numbers in the range [0,n).
It's function can be thought as rolling a dice with n sides. So you can
implement a 'true' dice with a function like: eyes:=RND(6)+1
*)
PROCEDURE GetSeed(VAR s:LONGINT);
PROCEDURE PutSeed(s:LONGINT);
END RandomNumber.